<template>
  <s-layout :mainBackground="'#FBF3E1'" class="chat-wrap" color="#000000" title="历史今天" navbar="inner"
            :is_main-body="true"
            :customBody="customBody()" :is_mainBody="false" :bg-style="{color:'#FBF3E1'}"
            :is_back="true" backgroundColor="#FBF3E1">
    <today-index :detail="state.detail" :options="state.options"></today-index>
  </s-layout>
</template>

<script setup>
  import TodayIndex from '@/pages/chineseSurname/components/todayIndex.vue';
  import { reactive } from 'vue';
  import { onLoad } from '@dcloudio/uni-app';
  import sheep from '@/sheep';

  const state = reactive({
    options: {},
    detail: {},
  });
  const customBody = () => {
    return {
      'display': 'flex',
      'flex-direction': 'column',
      'align-items': 'center',
    };
  };
  onLoad((options) => {
    state.options = options;
    getHistoryDetail();
  });

  async function getHistoryDetail() {
    const { data } = await sheep.$api.surname.getHistoryDetail({
      id: state.options.id,
    });
    state.detail = data
  }
</script>


<style scoped lang="scss">

</style>
